﻿<UserControl x:Class="StockAnalyst2.Plugins.Visualization.Realtime.RealtimePluginViewer"
			 x:ClassModifier="internal"
			 
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Utils="clr-namespace:Utils.Wpf;assembly=Utils"
             mc:Ignorable="d" 
			 
			 xmlns:Realtime="clr-namespace:StockAnalyst2.Plugins.Visualization.Realtime" 
			 xmlns:Converters="clr-namespace:Utils.Wpf.Converters;assembly=Utils" 
			 			 
			 Background="#1F1F1F"	 
			 Utils:AnimatorOnVisibilityChange.AnimationType="Fade"
			 Utils:AnimatorOnVisibilityChange.Duration="1000"		
			 Visibility="Collapsed"
			 
			 d:DesignWidth="1000"
			 d:DataContext="{d:DesignInstance Type=Realtime:RealtimePluginViewerVM}" >

	<UserControl.Resources>
		<ResourceDictionary>
			<Converters:MultiplierConverter x:Key="MultiplierConverter" />
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="..\..\..\StockAnalystTheme.xaml" />
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</UserControl.Resources>

	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="*" />
		</Grid.ColumnDefinitions>

		<!-- Control Panel Header -->
		<Border Grid.Row="0" BorderThickness="0" Background="{StaticResource ControlPanelHeaderBackground}" >
			<TextBlock Text="Realtime Plugin Control Panel" HorizontalAlignment="Center" Margin="10" FontSize="{Binding FontSize, RelativeSource={RelativeSource AncestorType=UserControl}, Converter={StaticResource MultiplierConverter}, ConverterParameter=1.5}" />
		</Border>

		<ItemsControl Grid.Row="1"  ItemsSource="{Binding Plugins}" ScrollViewer.CanContentScroll="False" HorizontalContentAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Background="#1F1F1F" BorderThickness="0" >
			<ItemsControl.ItemTemplate>
				<DataTemplate>
					<ContentControl Margin="3" Content="{Binding RealtimeControlPanel}" />
				</DataTemplate>
			</ItemsControl.ItemTemplate>
		</ItemsControl>

		<Realtime:NotificationViewer Grid.Row="2" Margin="0,6,0,0" DataContext="{Binding NotificationViewerVM}" />
	</Grid>
</UserControl>
